package my.cloud.study.controller;

import my.cloud.study.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
public class HelloController {

    @Value("${server.port}")
    private String port;

    @GetMapping("usr")
    public User getUserInfo(){
        User user = new User();
        user.setId(UUID.randomUUID().toString());
        user.setName("Brian Bao");
        user.setAddress(port);

        return user;
    }

}
